package com.cslg.ac.demo.dao.user.team;

import com.cslg.ac.demo.dao.user.po.team.TeamHeadPO;
import org.apache.ibatis.annotations.*;

@Mapper
public interface TeamHeadDAO {
    String TABLE_NAME = "e_t_account_head";
    String SELECT_FILED = "id,h_name hName,h_phone hPhone,h_introduction hIntroduction,id_card0 idCard0,id_card1 idCard1";

    @Insert({"insert into ",TABLE_NAME,"(id,h_phone) values(#{id},#{hPhone})"})
    void insert(@Param("id") int id,@Param("hPhone") String hPhone);

    @Update({"update ",TABLE_NAME,"set h_introduction = #{hIntroduction}"})
    void updateIntroduction(@Param("hIntroduction") String hIntroduction);

    @Update({"update ",TABLE_NAME,"set id_card0 = #{idCard0} where id = #{id}"})
    void updateIdCard0(@Param("id")int id,@Param("idCard0")String idCard0);

    @Update({"update",TABLE_NAME,"set id_card1 = #{idCard1} where id = #{id}"})
    void updateIdCard1(@Param("id")int id,@Param("idCard1") String idCard1);

    @Update({"update ",TABLE_NAME,"set h_name = #{hName},h_phone = #{hPhone} where id = #{id}"})
    void updateChange(TeamHeadPO teamHeadPO);
    @Update({"update ",TABLE_NAME,"set h_name = #{hName},h_phone = #{hPhone},h_introduction = #{hIntroduction} where id = #{id}"})
    void updateById(TeamHeadPO teamHeadPO);

    @Select({"select ",SELECT_FILED,"from ",TABLE_NAME,"where id = #{id}"})
    TeamHeadPO selectById(int id);



}
